package com.sky.mapper;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

@Mapper
public interface ReportMapper {
    Double getAmount(LocalDate begin, LocalDate end, Integer status);

    @Select("select count(*) from sky_take_out.user where create_time between #{begin} and #{end}")
    Integer getUserInfo(LocalDate begin, LocalDate end);

    @MapKey("name")
    LinkedList<Map> getTop10();

    Integer getOrderStaus(LocalDate begin, LocalDate end,Integer status);
}
